#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<vector>
using namespace std;

void paint_vector(vector<int>& v)
{
	for (auto e : v)
	{
		cout << e << " ";
	}
	cout << endl;
}

void paint_vector2(vector<int>& v)
{
	auto it = v.begin();
	while (it != v.end())
	{
		cout << *it << " ";
		++it;
	}
	cout << endl;
}

void paint_vector3(vector<int>& v)
{
	auto it = v.rbegin();
	while (it != v.rend())
	{
		cout << *it << " ";
		++it;
	}
	cout << endl;
}

void test1()
{
	vector<int> v1;
	paint_vector(v1);
}

void test2()
{
	vector<int> v2(10,1);
	paint_vector(v2);
}

void test3()
{
	vector<int> v3(10, 2);
	vector<int> v4 = v3;
	paint_vector(v4);
}

void test4()
{
	vector<int> v4(10, 3);
	vector<int> v5(v4.begin(), v4.end());
	paint_vector(v5);
}

void test5()
{
	vector<int> v5;
	v5.push_back(1);
	v5.push_back(2);
	v5.push_back(3);
	v5.push_back(4);
	v5.push_back(5);
	paint_vector2(v5);
}

void test6()
{
	vector<int> v6;
	v6.push_back(1);
	v6.push_back(2);
	v6.push_back(3);
	v6.push_back(4);
	v6.push_back(5);
	paint_vector3(v6);
}

void test7()
{
	vector<int> v7(10, 7);
	cout << v7.size() << endl;
}

void test8()
{
	vector<int> v8(10, 8);
	cout << v8.capacity() << endl;
}

void test9()
{
	vector<int> v9;
	vector<int> v10(10,9);
	if (v9.empty())
	{
		for (auto e : v9)
		{
			cout << e << " ";
		}
		cout << endl;
	}

	if (v10.empty())
	{
		for (auto ch : v10)
		{
			cout << ch << " ";
		}
		cout << endl;
	}

}

void test10()
{
	vector<int> v10(10, 10);
	v10.resize(15, 5);
	paint_vector(v10);
}

void test11()
{
	vector<int> v11(10, 11);
	v11.reserve(15);

}

void test12()
{
	vector<int> v12;
	v12.push_back(1);
	v12.push_back(2);
	paint_vector(v12);

}

void test13()
{
	vector<int> v13(10,1);
	v13.pop_back();
	v13.pop_back();
	paint_vector(v13);
}


	void test14()
	{
		vector<int> v14;
		v14.push_back(1);
		v14.push_back(2);
		v14.push_back(3);
		v14.push_back(4);
		v14.push_back(5);
		v14.push_back(6);
	
		auto it = find(v14.begin(), v14.end(), 5);
		if (it != v14.end())
		{
			cout << *it << " ";
			++it;
		}
		else
		{
			cout << "no" << " ";
		}

	}

	void test15()
	{
		vector<int> v15(10,1);
		v15.insert(v15.begin()+3, 2);
		paint_vector(v15);
	}

	void test16()
	{
		vector<int> v16;
		v16.push_back(1);
		v16.push_back(2);
		v16.push_back(3);
		v16.push_back(4);
		v16.push_back(5);

		v16.erase(v16.begin() + 3);
		paint_vector(v16);
	}

	void test17()
	{
		vector<int> v17(5, 3);
		vector<int> v18(5, 6);

		paint_vector(v17);
		paint_vector(v18);
		swap(v17, v18);
		paint_vector(v18);
		paint_vector(v17);
	}


	void test18()
	{
		vector<int> v18;
		v18.push_back(1);
		v18.push_back(2);
		v18.push_back(3);
		v18.push_back(4);
		v18.push_back(5);

		cout<<v18[1]<<endl;
	}
	int main()
	{
		test18();
		return 0;
	}

